public class TestOperator {
    public static void main(String args[]){
        boolean b1 = true;
        boolean b2 = false;
        // 测试逻辑运算符
        System.out.println(b1&b2);  //与
        System.out.println(b1|b2);  //或
        System.out.println(!b2);    //取反
        System.out.println(b1^b2);  //异或

        // 短路与、短路或
        boolean b3 = 1>2 && (4<3/0);   //短路与前面为false的话后面不会执行
        System.out.println(b3);
    }
}
